namespace SinaFinanceBaseClassLibrary
{
    using System;
    using System.ComponentModel;
    using System.Runtime.CompilerServices;

    public class DB_PropertyChangedBase : INotifyPropertyChanged
    {
        private PropertyChangedEventHandler propertyChanged;

        public event PropertyChangedEventHandler PropertyChanged
        {
            [MethodImpl(MethodImplOptions.Synchronized)] add
            {
                this.propertyChanged = (PropertyChangedEventHandler)Delegate.Combine((Delegate)this.propertyChanged, (Delegate)value);
            }
            [MethodImpl(MethodImplOptions.Synchronized)] remove
            {
                this.propertyChanged = (PropertyChangedEventHandler)Delegate.Remove((Delegate)this.propertyChanged, (Delegate)value);
            }
        }

        public void NotifyPropertyChanged(string propertyName)
        {
            if (this.propertyChanged != null)
            {
                this.propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
